Crate random

source ·
Expand description

Sources of randomness.

Example

use random::Source;

let mut source = random::default(42);
println!("Scalar: {:?}", source.read::<f64>());
println!("Vector: {:?}", source.iter().take(2).collect::<Vec<f64>>());

Structs

An instance of the Xorshift128+ algorithm.
A random sequence.
An instance of the Xorshift128+ algorithm.

Traits

A source of randomness.
A random value.

Functions

Create an instance of the default source.